/*
 * @Author: MrDotYan 2564217790@qq.com
 * @Date: 2024-08-26 10:41:26
 * @LastEditors: MrDotYan 2564217790@qq.com
 * @LastEditTime: 2024-09-27 16:56:48
 * @FilePath: /webServerAdmin/src/api/modules/upload.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Upload } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 文件上传模块
 */
// 图片上传
export const uploadImg = (params: FormData) => {
  return http.post<Array<Upload.ResFileUrl>>(PORT1 + `/file/uploads`, params, { cancel: false });
};

export function uploadFiles(params: FormData) {
  return http.post<Array<Upload.ResFileUrl>>(PORT1 + `/file/uploads`, params, { cancel: false });
}

// 视频上传
export const uploadVideo = (params: FormData) => {
  return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params, { cancel: false });
};
